#ifndef STATIC_ARRAY_H
#define STATIC_ARRAY_H

#include "array.h"

template<class T, const int sz>
class StaticArray : public Array<T>{
private:
    T arr[sz > 0 ? sz : 1];
    void init();

protected:
    virtual const T* start() const { return sz > 0 ? arr : 0; }
    virtual T* start() { return sz > 0 ? arr : 0; }

public:
    StaticArray(const T src[] = 0);
    StaticArray(const Array<T>& src);

    virtual ~StaticArray();

    virtual void valid() const;
    virtual int size() const { return sz > 0 ? sz : 0; }

    void operator=(const Array<T>& src);
};

#include "static_array_impl.h"

#endif /*#define STATIC_ARRAY_H*/

